package com.th.common.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 企业信息
 * </p>
 *
 * @author yangzihuang
 * @since 2022-06-19
 */
@TableName("us_enterprise_info")
@ApiModel(value = "UsEnterpriseInfo对象", description = "企业信息")
@Data
public class UsEnterpriseInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("绑定的账户id")
    private Long userId;

    @ApiModelProperty("公司名称")
    @NotBlank(message = "公司名称不能为空")
    private String name;

    @ApiModelProperty("公司地址")
    @NotBlank(message = "公司地址不能为空")
    private String address;

    @ApiModelProperty("企业联系人")
    @NotBlank(message = "企业联系人不能为空")
    private String contact;

    @ApiModelProperty("企业联系方式")
    @NotBlank(message = "企业联系方式不能为空")
    private String contactNumber;

    @ApiModelProperty("证件类型(0: 社会统一信用码，1:组织机构代码)")
    @Min(value = 0,message = "证件类型最小为0")
    @Max(value = 1,message = "证件类型最小是1")
    private Integer idType;

    @ApiModelProperty("社会信用代码")
    private String socialCreditCode;

    @ApiModelProperty("组织机构代码")
    private String organizationCode;

    @ApiModelProperty("营业执照")
    @NotBlank(message = "营业执照不能为空")
    private String businessLicensePhoto;

    @ApiModelProperty("法定代表人姓名")
    @NotBlank(message = "法定代表人姓名不能为空")
    private String legalRepresentativeName;

    @ApiModelProperty("法定代表人身份证号")
    @NotBlank(message = "法定代表人身份证号不能为空")
    private String idNumber;

    @ApiModelProperty("法定代表人身份证照片(正面、国徽面)")
    @NotBlank(message = "法定代表人身份证照片(正面、国徽面)不能为空")
    private String idPhoto0;

    @ApiModelProperty("法定代表人身份证照片(反面、人像面)")
    @NotBlank(message = "法定代表人身份证照片(反面、人像面)不能为空")
    private String idPhoto1;

    @ApiModelProperty("开户银行账号")
    @NotBlank(message = "开户银行账号不能为空")
    private String bankAccountNumber;

    @ApiModelProperty("开户银行名称")
    @NotBlank(message = "开户银行名称不能为空")
    private String bankAccountName;

    @ApiModelProperty("开户银行支行名称")
    @NotBlank(message = "开户银行支行名称不能为空")
    private String bankAccountBranchName;

    @ApiModelProperty("企业类别(1:外贸，2:内贸)")
    @Min(value = 1,message = "企业类别最小是1")
    @Max(value = 2,message = "企业类别最大是1")
    private Integer enterpriseType;

    @ApiModelProperty("企业主营品类id(id为0时表示其他)")
    @Min(value = 0,message = "企业主营品类id最小是0")
    private Integer mainBusinessTypeId;

    @ApiModelProperty("企业主营品类名称")
    private String mainBusinessType;

    @ApiModelProperty("已签名协议")
    private String signedTreaty;

    @ApiModelProperty("状态(0:未提交，1:待审批, 2:已拒绝，3:已通过)")
    @Null(message = "状态必须为空")
    private Integer status;

    @ApiModelProperty("原因")
    @Null(message = "reason必须为空")
    private String reason;

    @ApiModelProperty("发布订单数量")
    private Integer publishOrderNum;

    @ApiModelProperty("完成订单数量")
    private Integer finishOrderNum;

    @ApiModelProperty("好评数量")
    private Integer positiveEvaluationNum;

    @ApiModelProperty("差评数量")
    private Integer negativeEvaluationNum;

    @ApiModelProperty("定级结果(1~5颗星)")
    private Integer gradeResult;

    @ApiModelProperty("定级状态(0:未定价、1:已定级)")
    private Integer gradeStatus;

    @ApiModelProperty("创建时间")
    @Null(message = "createTime必须为空")
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @Null(message = "updateTime必须为空")
    private LocalDateTime updateTime;
}
